DROP TABLE CRST_PO_REQUISITION_LINES_ALL;

CREATE TABLE CRST_PO_REQUISITION_LINES_ALL
(
  REQUISITION_LINE_ID            NUMBER         NOT NULL,
  REQUISITION_HEADER_ID          NUMBER         NOT NULL,
  LINE_NUM                       NUMBER         NOT NULL,
  LINE_TYPE_ID                   NUMBER         NOT NULL,
  CATEGORY_ID                    NUMBER         NOT NULL,
  ITEM_DESCRIPTION               VARCHAR2(240 BYTE) NOT NULL,
  UNIT_MEAS_LOOKUP_CODE          VARCHAR2(25 BYTE) NOT NULL,
  UNIT_PRICE                     NUMBER         NOT NULL,
  QUANTITY                       NUMBER         NOT NULL,
  DELIVER_TO_LOCATION_ID         NUMBER         NOT NULL,
  TO_PERSON_ID                   NUMBER(9)      NOT NULL,
  LAST_UPDATE_DATE               DATE           NOT NULL,
  LAST_UPDATED_BY                NUMBER         NOT NULL,
  SOURCE_TYPE_CODE               VARCHAR2(25 BYTE) NOT NULL,
  LAST_UPDATE_LOGIN              NUMBER,
  CREATION_DATE                  DATE,
  CREATED_BY                     NUMBER,
  ITEM_ID                        NUMBER,
  ITEM_REVISION                  VARCHAR2(3 BYTE),
  QUANTITY_DELIVERED             NUMBER,
  SUGGESTED_BUYER_ID             NUMBER(9),
  ENCUMBERED_FLAG                VARCHAR2(1 BYTE),
  RFQ_REQUIRED_FLAG              VARCHAR2(1 BYTE),
  NEED_BY_DATE                   DATE,
  LINE_LOCATION_ID               NUMBER,
  MODIFIED_BY_AGENT_FLAG         VARCHAR2(1 BYTE),
  PARENT_REQ_LINE_ID             NUMBER,
  JUSTIFICATION                  VARCHAR2(480 BYTE),
  NOTE_TO_AGENT                  VARCHAR2(480 BYTE),
  NOTE_TO_RECEIVER               VARCHAR2(480 BYTE),
  PURCHASING_AGENT_ID            NUMBER(9),
  DOCUMENT_TYPE_CODE             VARCHAR2(25 BYTE),
  BLANKET_PO_HEADER_ID           NUMBER,
  BLANKET_PO_LINE_NUM            NUMBER,
  CURRENCY_CODE                  VARCHAR2(15 BYTE),
  RATE_TYPE                      VARCHAR2(30 BYTE),
  RATE_DATE                      DATE,
  RATE                           NUMBER,
  CURRENCY_UNIT_PRICE            NUMBER,
  SUGGESTED_VENDOR_NAME          VARCHAR2(240 BYTE),
  SUGGESTED_VENDOR_LOCATION      VARCHAR2(240 BYTE),
  SUGGESTED_VENDOR_CONTACT       VARCHAR2(80 BYTE),
  SUGGESTED_VENDOR_PHONE         VARCHAR2(20 BYTE),
  SUGGESTED_VENDOR_PRODUCT_CODE  VARCHAR2(25 BYTE),
  UN_NUMBER_ID                   NUMBER,
  HAZARD_CLASS_ID                NUMBER,
  MUST_USE_SUGG_VENDOR_FLAG      VARCHAR2(1 BYTE),
  REFERENCE_NUM                  VARCHAR2(25 BYTE),
  ON_RFQ_FLAG                    VARCHAR2(1 BYTE),
  URGENT_FLAG                    VARCHAR2(1 BYTE),
  CANCEL_FLAG                    VARCHAR2(1 BYTE),
  SOURCE_ORGANIZATION_ID         NUMBER,
  SOURCE_SUBINVENTORY            VARCHAR2(10 BYTE),
  DESTINATION_TYPE_CODE          VARCHAR2(25 BYTE),
  DESTINATION_ORGANIZATION_ID    NUMBER,
  DESTINATION_SUBINVENTORY       VARCHAR2(10 BYTE),
  QUANTITY_CANCELLED             NUMBER,
  CANCEL_DATE                    DATE,
  CANCEL_REASON                  VARCHAR2(240 BYTE),
  CLOSED_CODE                    VARCHAR2(25 BYTE),
  AGENT_RETURN_NOTE              VARCHAR2(480 BYTE),
  CHANGED_AFTER_RESEARCH_FLAG    VARCHAR2(1 BYTE),
  VENDOR_ID                      NUMBER,
  VENDOR_SITE_ID                 NUMBER,
  VENDOR_CONTACT_ID              NUMBER,
  RESEARCH_AGENT_ID              NUMBER(9),
  ON_LINE_FLAG                   VARCHAR2(1 BYTE),
  WIP_ENTITY_ID                  NUMBER,
  WIP_LINE_ID                    NUMBER,
  WIP_REPETITIVE_SCHEDULE_ID     NUMBER,
  WIP_OPERATION_SEQ_NUM          NUMBER,
  WIP_RESOURCE_SEQ_NUM           NUMBER,
  ATTRIBUTE_CATEGORY             VARCHAR2(30 BYTE),
  DESTINATION_CONTEXT            VARCHAR2(30 BYTE),
  INVENTORY_SOURCE_CONTEXT       VARCHAR2(30 BYTE),
  VENDOR_SOURCE_CONTEXT          VARCHAR2(30 BYTE),
  ATTRIBUTE1                     VARCHAR2(150 BYTE),
  ATTRIBUTE2                     VARCHAR2(150 BYTE),
  ATTRIBUTE3                     VARCHAR2(150 BYTE),
  ATTRIBUTE4                     VARCHAR2(150 BYTE),
  ATTRIBUTE5                     VARCHAR2(150 BYTE),
  ATTRIBUTE6                     VARCHAR2(150 BYTE),
  ATTRIBUTE7                     VARCHAR2(150 BYTE),
  ATTRIBUTE8                     VARCHAR2(150 BYTE),
  ATTRIBUTE9                     VARCHAR2(150 BYTE),
  ATTRIBUTE10                    VARCHAR2(150 BYTE),
  ATTRIBUTE11                    VARCHAR2(150 BYTE),
  ATTRIBUTE12                    VARCHAR2(150 BYTE),
  ATTRIBUTE13                    VARCHAR2(150 BYTE),
  ATTRIBUTE14                    VARCHAR2(150 BYTE),
  ATTRIBUTE15                    VARCHAR2(150 BYTE),
  BOM_RESOURCE_ID                NUMBER,
  REQUEST_ID                     NUMBER,
  PROGRAM_APPLICATION_ID         NUMBER,
  PROGRAM_ID                     NUMBER,
  PROGRAM_UPDATE_DATE            DATE,
  USSGL_TRANSACTION_CODE         VARCHAR2(30 BYTE),
  GOVERNMENT_CONTEXT             VARCHAR2(30 BYTE),
  CLOSED_REASON                  VARCHAR2(240 BYTE),
  CLOSED_DATE                    DATE,
  TRANSACTION_REASON_CODE        VARCHAR2(25 BYTE),
  QUANTITY_RECEIVED              NUMBER,
  SOURCE_REQ_LINE_ID             NUMBER,
  ORG_ID                         NUMBER,
  GLOBAL_ATTRIBUTE1              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20             VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE_CATEGORY      VARCHAR2(30 BYTE),
  KANBAN_CARD_ID                 NUMBER,
  CATALOG_TYPE                   VARCHAR2(30 BYTE),
  CATALOG_SOURCE                 VARCHAR2(30 BYTE),
  MANUFACTURER_ID                NUMBER,
  MANUFACTURER_NAME              VARCHAR2(240 BYTE),
  MANUFACTURER_PART_NUMBER       VARCHAR2(30 BYTE),
  REQUESTER_EMAIL                VARCHAR2(240 BYTE),
  REQUESTER_FAX                  VARCHAR2(60 BYTE),
  REQUESTER_PHONE                VARCHAR2(60 BYTE),
  UNSPSC_CODE                    VARCHAR2(30 BYTE),
  OTHER_CATEGORY_CODE            VARCHAR2(30 BYTE),
  SUPPLIER_DUNS                  VARCHAR2(30 BYTE),
  TAX_STATUS_INDICATOR           VARCHAR2(30 BYTE),
  PCARD_FLAG                     VARCHAR2(1 BYTE),
  NEW_SUPPLIER_FLAG              VARCHAR2(1 BYTE),
  AUTO_RECEIVE_FLAG              VARCHAR2(1 BYTE),
  TAX_USER_OVERRIDE_FLAG         VARCHAR2(1 BYTE),
  TAX_CODE_ID                    NUMBER,
  NOTE_TO_VENDOR                 VARCHAR2(480 BYTE),
  OKE_CONTRACT_VERSION_ID        NUMBER,
  OKE_CONTRACT_HEADER_ID         NUMBER,
  ITEM_SOURCE_ID                 NUMBER,
  SUPPLIER_REF_NUMBER            VARCHAR2(150 BYTE),
  SECONDARY_UNIT_OF_MEASURE      VARCHAR2(25 BYTE),
  SECONDARY_QUANTITY             NUMBER,
  PREFERRED_GRADE                VARCHAR2(25 BYTE),
  SECONDARY_QUANTITY_RECEIVED    NUMBER,
  SECONDARY_QUANTITY_CANCELLED   NUMBER,
  VMI_FLAG                       VARCHAR2(1 BYTE),
  AUCTION_HEADER_ID              NUMBER,
  AUCTION_DISPLAY_NUMBER         VARCHAR2(40 BYTE),
  AUCTION_LINE_NUMBER            NUMBER,
  REQS_IN_POOL_FLAG              VARCHAR2(1 BYTE),
  BID_NUMBER                     NUMBER,
  BID_LINE_NUMBER                NUMBER,
  REQUISITION_LINE_ID_N          NUMBER
);
